package com.me.iot.thread;

import com.me.iot.starter.YmlFileMeIOTActiveStarter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 使得项目伴随SpringBoot项目一并启动的线程函数
 */
@Component
public class MeIOTThreadRunner implements CommandLineRunner {
    @Autowired
    YmlFileMeIOTActiveStarter activeStarter;

    @Override
    public void run(String... args) throws Exception {
        activeStarter.loadConfig();
    }
}
